var gulp = require('gulp-param')(require('gulp'), process.argv);
var sassport = require('gulp-sassport');
var es6 = require("./es6");

es6({
    gulp: gulp,
    paths: {
        srcRoot: "/Users/tongguwei/frontprojects/sassporttest",
        destRoot: "/Users/tongguwei/frontprojects/sassporttest"
    }
});

var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');

gulp.task('sass', function() {
    return gulp.src('./sass/**/*.scss')
        .pipe(sassport([
            require("./sassmodule/foo")
        ], {
        }))
        .pipe(postcss([
            autoprefixer({ browsers: ['> 1%',  'ios >= 7'] })
        ]))
        .pipe(gulp.dest('./css'));
});

gulp.task('sass:watch', function() {
    gulp.watch('./sass/**/*.scss', ['sass']);
});